import request from '@/utils/request'

// 获取职位分页
export function getPostPageList(data,page,size) {
    return request({
        url: `/system/sysPostController/getPostPageList?page=${page}&size=${size}`,
        method: 'post',
        data: data
    })
}

// 获取职位详情
export function getPostDetail(id) {
    return request({
        url: `/system/sysPostController/getPostDetail?id=${id}`,
        method: 'get'
    })
}

// 新增职位
export function addPost(data) {
    return request({
        url: '/system/sysPostController/addPost',
        method: 'post',
        data: data
    })
}

// 编辑职位
export function updatePost(data) {
    return request({
        url: '/system/sysPostController/updatePost',
        method: 'put',
        data: data
    })
}

// 删除职位
export function deletePost(id) {
    return request({
        url: `/system/sysPostController/deletePost?id=${id}`,
        method: 'delete'
    })
}

// 获取职位下拉
export function getPostSelect() {
    return request({
        url: `/system/sysPostController/getPostSelect`,
        method: 'get'
    })
}
